package com.neo.util;

import java.util.concurrent.locks.LockSupport;

public class CommonUtil {
    private  CommonUtil(){
        throw new IllegalStateException("Util Class");
    }
    public static String getCurThreadInfo(){
        return String.format("[%d]%s:%s ", Thread.currentThread().getId(),Thread.currentThread().getName(),Thread.currentThread().getState());
    }

    public static Long getCurThreadId(){
        return Thread.currentThread().getId();
    }

    public static void sleepMilliSeconds(int millSecond){
        LockSupport.parkNanos(millSecond * 1000L*1000L);
    }
}
